#include "question.hpp"

Question::Question(const int id, const QString& text, const QList<QSharedPointer<Answer> > &answers, QObject *parent)
	:QObject(parent)
	,m_id(id)
	,m_text(text)
	,m_answers(answers)
{
}

int Question::questionId() const {
	return m_id;
}

QString Question::text() const {
	return m_text;
}

QList<QSharedPointer<Answer> > Question::answers() const {
	return m_answers;
}

void Question::setText(const QString &newText) {
	m_text = newText;
}

void Question::setAnswers(const QList<QSharedPointer<Answer> > &newAnswers) {
	m_answers = newAnswers;
}

void Question::addAnswer(QSharedPointer<Answer> answer) {
	m_answers.append(answer);
}

